Low-cost and high-safety battery technologies are critical for both transportation and grid energy storage applications. Significant efforts have been made in the past years to move beyond lithium-ion battery technology. Magnesium batteries are one promising technology because of the high volumetric capacity (3832 mAh/cm3 for Mg metal, in comparison to 2062 mAh/cm3 for Li metal and 1136 mAh/cm3 for Na metal), improved safety (nondendritic and less chemically active compared to Na and Li metal), and potentially low cost given the natural abundance of magnesium.